package homework_2;

/**
 * @desc:
 * @author: Ping
 * @date: 2025/9/12 14:44
 */

public class Computer {
    /**
     * todo: 按照bean规范要求，为Computer类添加必要的属性和构造方法
     */
    private CPU cpu;
    private Screen screen;

    public void setCpu(CPU cpu) {
        this.cpu = cpu;
    }

    public void setScreen(Screen screen) {
        this.screen = screen;
    }

    public void startup(){
        System.out.println("计算机开始启动...");
        cpu.startup();
        screen.startup();
        System.out.println("计算机启动完毕！");
    }
}
